<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/">

    <ui:composition template="/templatemnt.xhtml">
        <ui:define name="body">
            <h:form>
                <br/>
                <h:panelGrid columns="3" styleClass="panel">
                    <h:outputText value="#{bundle.EditCinemaTitle}" styleClass="titulo"
                                  rendered="#{cinemaController.modo=='Edit'}">
                    </h:outputText>
                    <h:outputText value="#{bundle.CreateCinemaTitle}" styleClass="titulo"
                                  rendered="#{cinemaController.modo=='Create'}">
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewCinemaTitle}" styleClass="titulo"
                                  rendered="#{cinemaController.modo=='View'}">
                    </h:outputText>
                    <h:outputText/>
                    <h:panelGrid columns="3" styleClass="panel_boton_m">
                        <h:messages id="msgs"
                                    errorStyle="color: red; background-color: #FF9797" 
                                    infoStyle="color: green; background-color: #99ff99 "/>
                        <h:commandButton rendered="#{cinemaController.modo!='View'}"
                                         action="#{cinemaController.confirma}" title="Save"
                                         image="/resources/img/guardar.png">
                        </h:commandButton>
                        <h:commandButton action="#{cinemaController.prepareList}" title="Cancel" 
                                         image="/resources/img/cancelar.png" immediate="true">
                        </h:commandButton>
                    </h:panelGrid>
                    <h:outputLabel value="#{bundle.EditCinemaLabel_cinemaID}" for="cinemaID" />
                    <h:inputText id="cinemaID" value="#{cinemaController.selected.cinemaID}" 
                                 title="#{bundle.EditCinemaTitle_cinemaID}" disabled="true"
                                 size="#{cinemaController.longCampo('cinemaID')}"/>
                    <h:outputText/>
                    <h:outputLabel value="#{bundle.EditCinemaLabel_cinemaName}" for="cinemaName" />
                    <h:inputText id="cinemaName" value="#{cinemaController.selected.cinemaName}" 
                                 title="#{bundle.EditCinemaTitle_cinemaName}" 
                                 required="#{cinemaController.campoNulo('cinemaName')}" 
                                 requiredMessage="#{bundle.EditCinemaRequiredMessage_cinemaName}"
                                 size="#{cinemaController.longCampo('cinemaName')}"
                                 maxlength="#{cinemaController.longCampo('cinemaName')}"
                                 disabled="#{cinemaController.modo=='View'}"/>
                    <h:message for="cinemaName" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditCinemaLabel_cinemaLocation}" for="cinemaLocation" />
                    <h:inputText id="cinemaLocation" value="#{cinemaController.selected.cinemaLocation}" 
                                 title="#{bundle.EditCinemaTitle_cinemaLocation}" 
                                 required="#{cinemaController.campoNulo('cinemaLocation')}" 
                                 requiredMessage="#{bundle.EditCinemaRequiredMessage_cinemaLocation}"
                                 size="#{cinemaController.longCampo('cinemaLocation')}"
                                 maxlength="#{cinemaController.longCampo('cinemaLocation')}"
                                 disabled="#{cinemaController.modo=='View'}"/>
                    <h:message for="cinemaLocation" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditCinemaLabel_cinemaLastSeat}" for="cinemaLastSeat" />
                    <h:inputText id="cinemaLastSeat" value="#{cinemaController.selected.cinemaLastSeat}" 
                                 title="#{bundle.EditCinemaTitle_cinemaLastSeat}" 
                                 required="#{cinemaController.campoNulo('cinemaLastSeat')}" 
                                 requiredMessage="#{bundle.EditCinemaRequiredMessage_cinemaLastSeat}"
                                 size="#{cinemaController.longCampo('cinemaLastSeat')}"
                                 maxlength="#{cinemaController.longCampo('cinemaLastSeat')}"
                                 disabled="#{cinemaController.modo=='View'}"/>
                    <h:message for="cinemaLastSeat" errorStyle="color: red" infoStyle="color: green"/>
                </h:panelGrid>
                <br />
            </h:form>
        </ui:define>
    </ui:composition>
</html>
